package com.ferry.transport.netty.concurrent;

/**
 * Created by daiyong
 */
public interface ExecutorFactory {
	CloseableExecutor newExecutor(Target target, String name);

	enum Target {
		PROVIDER,
		CONSUMER
	}

	String CONSUMER_EXECUTOR_CORE_WORKERS           = "executor.factory.consumer.core.workers";
	String PROVIDER_EXECUTOR_CORE_WORKERS           = "executor.factory.provider.core.workers";
	String CONSUMER_EXECUTOR_MAX_WORKERS            = "executor.factory.consumer.max.workers";
	String PROVIDER_EXECUTOR_MAX_WORKERS            = "executor.factory.provider.max.workers";
	String CONSUMER_EXECUTOR_QUEUE_TYPE             = "executor.factory.consumer.queue.type";
	String PROVIDER_EXECUTOR_QUEUE_TYPE             = "executor.factory.provider.queue.type";
	String CONSUMER_EXECUTOR_QUEUE_CAPACITY         = "executor.factory.consumer.queue.capacity";
	String PROVIDER_EXECUTOR_QUEUE_CAPACITY         = "executor.factory.provider.queue.capacity";
	String CONSUMER_DISRUPTOR_WAIT_STRATEGY_TYPE    = "executor.factory.consumer.disruptor.wait.strategy.type";
	String PROVIDER_DISRUPTOR_WAIT_STRATEGY_TYPE    = "executor.factory.provider.disruptor.wait.strategy.type";
	String CONSUMER_THREAD_POOL_REJECTED_HANDLER    = "executor.factory.consumer.thread.pool.rejected.handler";
	String PROVIDER_THREAD_POOL_REJECTED_HANDLER    = "executor.factory.provider.thread.pool.rejected.handler";
}
